public class Test {
    public static void main(String[] args) throws PosIllegalityException {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.add(1);
        myArrayList.add(2);
        myArrayList.add(6);
        myArrayList.add(4);
        myArrayList.add(5);
        System.out.println(myArrayList.indexOf(6));
        System.out.println(myArrayList.indexOf(180));
        try {
            myArrayList.add(1, 3);
        } catch (PosIllegalityException e) {
            e.printStackTrace();
        } try {
            System.out.println(myArrayList.get(1));
            myArrayList.remove(6);
            myArrayList.set(2, 6);
        } catch (EmptyListException e) {
            e.printStackTrace();
        }

        myArrayList.display();

    }
}
